import React from 'react'
import {Route, IndexRoute} from 'react-router'

import {
    App,
    Home,
    NotFoundPage,
    ProcessDetail,//办理流程详情
    /* HandlingProgress, //办理进度
     ConfirmOrder,
     Coupon,
     CalculatorOfYearlyCheck,
     //YearlyCheckDetail,

     AddAddress, //添加地址
     AddressEdit, //编辑地址
     MailingAddress, //选择寄送年检资料的方式
     AddressList, //地址列表
     OrderDetails, //年检详情
     AnnualDataMailDoor, //年检资料及收件地址 提交完资料后 邮政提示页面
     SendTheAddress, //年检资料及收件地址 提交完资料后 自主寄送提示页面
     ProceDures,
     YearlyCheckDetail,
     AnnualInspection,//年检手续办理
     UpdateCarInfo,//更新车辆信息
     TaxConfirm, // 年检手续办理-险种确认
     Questions,//常见问题
     */
} from './containers'
export default (
    <Route path="/" component={App}>
        <IndexRoute component={Home}/>
        <Route path="processDetail" components={ProcessDetail}/>

        <Route path="chargeInstructions" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/chargeInstructions').default)
            }, 'chargeInstructions')
        }}/>

        <Route path="serviceDetail/:inspectionType" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/serviceDetail').default)
            }, 'serviceDetail')
        }}/>

        <Route path="uploadResult/:documentId" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/uploadResult').default)
            }, 'uploadResult')
        }}/>

        <Route path="inspectionTips/:inspectionType" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/inspectionTips').default)
            }, 'inspectionTips')
        }}/>

        <Route path="uploadPage/:taxId/:documentId(/:backSteps)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/uploadPage').default)
            }, 'uploadPage')
        }}/>

        <Route path="remindHome(/:carNumber)(/:carId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/remindHome').default)
            }, 'remindHome')
        }}/>

        <Route path="/remindProcessDetail/:url(/:inspectionType)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/remindProcessDetail').default)
            }, 'remindProcessDetail')
        }}/>

        <Route path="/processDetailsView/:inspectionType" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/remindProcessDetail/processDetails').default)
            }, 'processDetailsView')
        }}/>

        <Route path="overLineProcessDetail" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/processDetail/overLineProcessDetail').default)
            }, 'overLineProcessDetail')
        }}/>

        <Route path="yearlyCheckDetail(/:carNumber)(/:carId)(/:type)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/calculatorOfYearlyCheck/yearlyCheckDetail').default)
            }, 'yearlyCheckDetail')
        }}/>

        <Route path="calculatorOfYearlyCheck(/:carNumber)(/:carId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/calculatorOfYearlyCheck').default)
            }, 'calculatorOfYearlyCheck')
        }}/>

        <Route path="confirmOrder" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/confirmOrder').default)
            }, 'confirmOrder')
        }}/>

        <Route path="confirmOrder/:carId/:carNumber(/:inspectionType)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/confirmOrder').default)
            }, 'confirmOrder')
        }}/>

        <Route path="questions" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/questions').default)
            }, 'questions')
        }}/>

        <Route path="updateCarInfo(/:carNumber)(/:carId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/updateCarInfo').default)
            }, 'updateCarInfo')
        }}/>

        <Route path="handlingProgress/:orderId/:title/:type" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/handlingProgress').default)
            }, 'handlingProgress')
        }}/>

        <Route path="addAddress/:orderId/:type(/:addressId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/addAddress').default)
            }, 'addAddress')
        }}/>

        <Route path="addressEdit/:orderId/:type(/:addressId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/addressEdit').default)
            }, 'addressEdit')
        }}/>

        <Route path="addressList/:orderId(/:type)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/addressList').default)
            }, 'addressList')
        }}/>

        <Route path="mailingAddress(/:orderId)(/:isClose)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/mailingAddress').default)
            }, 'mailingAddress')
        }}/>

        <Route path="orderDetails(/:orderId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/orderDetails').default)
            }, 'orderDetails')
        }}/>

        <Route path="sendTheAddress/:type/:btn/:orderId(/:isClose)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/sendTheAddress').default)
            }, 'sendTheAddress')
        }}/>

        <Route path="sendTheAddress/overLine/:orderId" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/sendTheAddress').default)
            }, 'sendTheAddress')
        }}/>

        <Route path="annualInspection(/:orderId)(/:isClose)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/AnnualInspection').default)
            }, 'annualInspection')
        }}/>

        <Route path="taxConfirm/:documentId/:key/:inspectionType/:mailType/:carnumber/:confirmType" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/TaxConfirm').default)
            }, 'taxConfirm')
        }}/>
        
         <Route path="taxConfirmUpdata/:key(/:carnumber)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/TaxConfirmUpdata').default)
            }, 'TaxConfirmUpdata')
        }}/>

        <Route path="newUrl(/:key)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/NewUrl').default)
            }, 'NewUrl')
        }}/>

        <Route path="newAppUrl(/:target)(/:carnumber)(/:carId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/NewAppUrl').default)
            }, 'NewAppUrl')
        }}/>
        <Route path="APPjumpUrl(/:orderId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/APPjumpUrl').default)
            }, 'APPjumpUrl')
        }}/>

        <Route path="jumpUrl(/:orderId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/JumpUrl').default)
            }, 'JumpUrl')
        }}/>

        <Route path="coupon/(:couponId)" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/Coupon').default)
            }, 'coupon')
        }}/>

        <Route path="testContainer" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/testContainer').default)
            }, 'testContainer')
        }}/>

        <Route path="orderList" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/orderList').default)
            }, 'orderList')
        }}/>
        <Route path="orderList" getComponent={(nextState, cb) => {
            require.ensure([], (require) => {
                cb(null, require('./containers/error').default)
            }, 'error')
        }}/>


        {/*<Route path="calculatorOfYearlyCheck" component={CalculatorOfYearlyCheck}/>*/}
        {/*<Route path="confirmOrder" component={ConfirmOrder}/>*/}
        {/*<Route path="yearlyCheckDetail" component={YearlyCheckDetail}/>*/}
        {/*<Route path="questions" components={Questions}/>*/}
        {/*<Route path="updateCarInfo" components={UpdateCarInfo}/>*/}
        {/*<Route path="handlingProgress/:orderId/:title/:type" component={HandlingProgress}/>*/}
        {/*<Route path="coupon/:carId/:selectIndex" component={Coupon}/>*/}
        {/* <Route path="addAddress" component={AddAddress}/>*/}
        {/* <Route path="addressEdit(/:addressId)" component={AddressEdit}/>*/}
        {/*<Route path="addressList(/:orderId)" component={AddressList}/>*/}
        {/*<Route path="mailingAddress(/:orderId)" component={MailingAddress}/>*/}
        {/*<Route path="proceDures(/:orderId)" component={ProceDures}/>*/}
        {/*<Route path="orderDetails(/:orderId)" component={OrderDetails}/>*/}
        {/* <Route path="sendTheAddress/:type/:btn/:orderId" components={SendTheAddress}/>*/}
        {/*<Route path="annualInspection(/:orderId)" component={AnnualInspection}/>*/}
        {/*<Route path="annualDataMailDoor/:type/:btn/:orderId" components={AnnualDataMailDoor}/>*/}
        {/* <Route path="taxConfirm/:key" component={TaxConfirm}/>*/}
        {/*<Route path="checkViolation(/:carNUM)" component={CheckViolation}/>*/}
        {/*<Route path="FooterAlertDemo" component={FooterAlertDemo}/>*/}
        <Route path="*" component={NotFoundPage}/>
    </Route>
);